<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>新闻详情</title>
    <style>
        a{
            text-decoration: none;
        }
        a:hover{
            color: cornflowerblue;
        }
        a{
            color: #2b303a;
        }
        h4{
            color: #1b6d85;
        }
        span{
            color: #0d8ddb;
        }
        .bo{
            position:fixed;
        }
    </style>
    <link href="../css/font-awesome.min.css?v=4.4.0" rel="stylesheet">
</head>
<body>
<div class="bo"><a href="#" onclick="javascript :history.back(-1);"><i class="fa fa-mail-reply" aria-hidden="true" style="color: #1c84c6"></i></a></div>
<div id="box" style="width: 50%;margin: 0 auto">
</div>
<script src="../js/jquery.min.js"></script>
<script>
    $.ajax({
        type:"get",
        url:"/news/byidnews/"+window.location.search.split("id=")[1],
        dataType:"json",
        success:function (data) {
                let html="<div>"
                    +"<h2>news_title</h2>"
                    +"<h4>subheading</h4>"
                    +"<span>news_name</span><span>position</span>|<span>date</span></div>"
                    +"<div>&nbsp;&nbsp;&nbsp;&nbsp;news_content</div>"
                html=html.replace("news_content",data.data.news_content)
                html=html.replace("news_title",data.data.news_title)
                html=html.replace("subheading",data.data.subheading)
                html=html.replace("news_content",data.data.news_content)
                html=html.replace("news_name",data.data.news_name)
                html=html.replace("position",data.data.position)
                html=html.replace("date",data.data.date)
                $("#box").append(html);
            }

    })
</script>
</body>
</html>